<h2>后台权限&gt;设置角色权限</h2>
<form method="post" action="<?= AdminController::_makeURL('admin', 'priv', 'set_user')?>">
<input type='hidden' name='uid' value="<?= $this->uid?>"/>

<input type='submit' value='保存'/>

<table class="list" cellpadding="0" cellspacing="0">
	<thead>
		<td>user_id</td>
		<td>用户名</td>
	</thead>
	<tr>
		<td><?= $this->ret['data']['user']['id']?></td>
		<td><?= $this->ret['data']['user']['username']?></td>
	</tr>
</table>

<table class="list" cellpadding="0" cellspacing="0">
	<thead>
		<td>role_id</td>
		<td>&nbsp;</td>
		<td>角色名</td>
	</thead>
	<? foreach($this->ret['data']['roles'] as $row):?>
	<tr>
		<td><?= $row['id']?></td>
		<td><input type='checkbox' name='role_id[]' value='<?= $row['id']?>' <?= in_array($row['role'], $this->ret['data']['role'])?'checked':''?>></td>
		<td><?= $row['role']?></td>
	</tr>
	<? endforeach;?>
</table>

<? include('part_resource.phtml');?>

<input type='submit' value='保存'/>
</form>
